return 0
}
-_ostree_admin_cleanup() {
- local boolean_options="
- $main_boolean_options
- "
-
- local options_with_args="
- --sysroot
- "
-
- local options_with_args_glob=$( __ostree_to_extglob "$options_with_args" )
-
- case "$prev" in
- --sysroot)
- __ostree_compreply_dirs_only
- return 0
- ;;
- $options_with_args_glob )
- return 0
- ;;
- esac
-
- case "$cur" in
- -*)
- local all_options="$boolean_options $options_with_args"
- __ostree_compreply_all_options
- ;;
- esac
-
- return 0
-}
-
-_ostree_admin_config_diff() {
- local boolean_options="
- $main_boolean_options
- "
-
- local options_with_args="
- --os
- --sysroot
- "
-
- local options_with_args_glob=$( __ostree_to_extglob "$options_with_args" )
-
- case "$prev" in
- --os)
- __ostree_compreply_oses
- return 0
- ;;
- --sysroot)
- __ostree_compreply_dirs_only
- return 0
- ;;
- $options_with_args_glob )
- return 0
- ;;
- esac
-
- case "$cur" in
- -*)
- local all_options="$boolean_options $options_with_args"
- __ostree_compreply_all_options
- ;;
- esac
-
- return 0
-}
-
-_ostree_admin_deploy() {
- local boolean_options="
- $main_boolean_options
- --retain
- --retain-pending
- --retain-rollback
- --not-as-default
- --karg-proc-cmdline
- "
-
- local options_with_args="
- --karg
- --karg-append
- --origin-file
- --os
- --sysroot
- "
-
- local options_with_args_glob=$( __ostree_to_extglob "$options_with_args" )
-
- case "$prev" in
- --origin-file)
- __ostree_compreply_all_files
- return 0
- ;;
- --os)
- __ostree_compreply_oses
- return 0
- ;;
- --sysroot)
- __ostree_compreply_dirs_only
- return 0
- ;;
- $options_with_args_glob )
- return 0
- ;;
- esac
-
- case "$cur" in
- -*)
- local all_options="$boolean_options $options_with_args"
- __ostree_compreply_all_options
- ;;
- esac
-
- return 0
-}
-
-_ostree_admin_init_fs() {
- local boolean_options="
- $main_boolean_options
- "
-
- local options_with_args="
- --sysroot
- "
-
- local options_with_args_glob=$( __ostree_to_extglob "$options_with_args" )
-
- case "$prev" in
- --sysroot)
- __ostree_compreply_dirs_only
- return 0
- ;;
- $options_with_args_glob )
- return 0
- ;;
- esac
-
- case "$cur" in
- -*)
- local all_options="$boolean_options $options_with_args"
- __ostree_compreply_all_options
- ;;
- esac
-
- return 0
-}
-
-_ostree_admin_instutil() {
- local boolean_options="
- $main_boolean_options
- "
-
- local options_with_args="
- --sysroot
- "
-
- local options_with_args_glob=$( __ostree_to_extglob "$options_with_args" )
-
- case "$prev" in
- --sysroot)
- __ostree_compreply_dirs_only
- return 0
- ;;
- $options_with_args_glob )
- return 0
- ;;
- esac
-
- case "$cur" in
- -*)
- local all_options="$boolean_options $options_with_args"
- __ostree_compreply_all_options
- ;;
- *)
- local argpos=$( __ostree_pos_first_nonflag $( __ostree_to_alternatives "$options_with_args" ) )
- if [ $cword -eq $argpos ]; then
- local instutil_commands="
- grub2-generate
- selinux-ensure-labeled
- set-kargs
- "
- COMPREPLY=( $( compgen -W "$instutil_commands" -- "$cur" ) )
- fi
- ;;
- esac
-
- return 0
-}
-
-_ostree_admin_os_init() {
- local boolean_options="
- $main_boolean_options
- "
-
- local options_with_args="
- --sysroot
- "
-
- local options_with_args_glob=$( __ostree_to_extglob "$options_with_args" )
-
- case "$prev" in
- --sysroot)
- __ostree_compreply_dirs_only
- return 0
- ;;
- $options_with_args_glob )
- return 0
- ;;
- esac
-
- case "$cur" in
- -*)
- local all_options="$boolean_options $options_with_args"
- __ostree_compreply_all_options
- ;;
- esac
-
- return 0
-}
-
-_ostree_admin_pin() {
- local boolean_options="
- $main_boolean_options
- "
-
- local options_with_args="
- --sysroot
- "
-
- local options_with_args_glob=$( __ostree_to_extglob "$options_with_args" )
-
- case "$prev" in
- --sysroot)
- __ostree_compreply_dirs_only
- return 0
- ;;
- $options_with_args_glob )
- return 0
- ;;
- esac
-
- case "$cur" in
- -*)
- local all_options="$boolean_options $options_with_args"
- __ostree_compreply_all_options
- ;;
- esac
-
- return 0
-}
-
-_ostree_admin_set_origin() {
- local boolean_options="
- $main_boolean_options
- "
-
- local options_with_args="
- --index
- --set -s
- --sysroot
- "
-
- local options_with_args_glob=$( __ostree_to_extglob "$options_with_args" )
-
- case "$prev" in
- --sysroot)
- __ostree_compreply_dirs_only
- return 0
- ;;
- $options_with_args_glob )
- return 0
- ;;
- esac
-
- case "$cur" in
- -*)
- local all_options="$boolean_options $options_with_args"
- __ostree_compreply_all_options
- ;;
- *)
- local argpos=$( __ostree_pos_first_nonflag $( __ostree_to_alternatives "$options_with_args" ) )
- if [ $cword -eq $argpos ]; then
- __ostree_compreply_remotes
- fi
- ;;
- esac
-
- return 0
-}
-
-_ostree_admin_status() {
- local boolean_options="
- $main_boolean_options
- "
-
- local options_with_args="
- --sysroot
- "
-
- local options_with_args_glob=$( __ostree_to_extglob "$options_with_args" )
-
- case "$prev" in
- --sysroot)
- __ostree_compreply_dirs_only
- return 0
- ;;
- $options_with_args_glob )
- return 0
- ;;
- esac
-
- case "$cur" in
- -*)
- local all_options="$boolean_options $options_with_args"
- __ostree_compreply_all_options
- ;;
- esac
-
- return 0
-}
-
-_ostree_admin_switch() {
- local boolean_options="
- $main_boolean_options
- "
-
- local options_with_args="
- --os
- --reboot -r
- --sysroot
- "
-
- local options_with_args_glob=$( __ostree_to_extglob "$options_with_args" )
-
- case "$prev" in
- --os)
- __ostree_compreply_oses
- return 0
- ;;
- --sysroot)
- __ostree_compreply_dirs_only
- return 0
- ;;
- $options_with_args_glob )
- return 0
- ;;
- esac
-
- case "$cur" in
- -*)
- local all_options="$boolean_options $options_with_args"
- __ostree_compreply_all_options
- ;;
- *)
- local argpos=$( __ostree_pos_first_nonflag $( __ostree_to_alternatives "$options_with_args" ) )
-
- if [ $cword -eq $argpos ]; then
- __ostree_compreply_refs
- fi
- esac
-
- return 0
-}
-
-_ostree_admin_undeploy() {
- local boolean_options="
- $main_boolean_options
- "
-
- local options_with_args="
- --sysroot
- "
-
- local options_with_args_glob=$( __ostree_to_extglob "$options_with_args" )
-
- case "$prev" in
- --sysroot)
- __ostree_compreply_dirs_only
- return 0
- ;;
- $options_with_args_glob )
- return 0
- ;;
- esac
-
- case "$cur" in
- -*)
- local all_options="$boolean_options $options_with_args"
- __ostree_compreply_all_options
- ;;
- esac
-
- return 0
-}
-
-_ostree_admin_unlock() {
- local boolean_options="
- $main_boolean_options
- --hotfix
- "
-
- local options_with_args="
- --sysroot
- "
-
- local options_with_args_glob=$( __ostree_to_extglob "$options_with_args" )
-
- case "$prev" in
- --sysroot)
- __ostree_compreply_dirs_only
- return 0
- ;;
- $options_with_args_glob )
- return 0
- ;;
- esac
-
- case "$cur" in
- -*)
- local all_options="$boolean_options $options_with_args"
- __ostree_compreply_all_options
- ;;
- esac
-
- return 0
-}
-
-_ostree_admin_upgrade() {
- local boolean_options="
- $main_boolean_options
- --allow-downgrade
- --deploy-only
- --pull-only
- --reboot -r
- "
-
- local options_with_args="
- --os
- --override-commit
- --sysroot
- "
-
- local options_with_args_glob=$( __ostree_to_extglob "$options_with_args" )
-
- case "$prev" in
- --override-commit)
- __ostree_compreply_commits
- return 0
- ;;
- --sysroot)
- __ostree_compreply_dirs_only
- return 0
- ;;
- $options_with_args_glob )
- return 0
- ;;
- esac
-
- case "$cur" in
- -*)
- local all_options="$boolean_options $options_with_args"
- __ostree_compreply_all_options
- ;;
- esac
-
- return 0
-}
-
-_ostree_admin() {
- local subcommands="
- cleanup
- config-diff
- deploy
- init-fs
- instutil
- os-init
- set-origin
- status
- switch
- undeploy
- unlock
- upgrade
- "
-
- __ostree_subcommands "$subcommands" && return 0
-
- case "$cur" in
- -*)
- COMPREPLY=( $( compgen -W "$main_boolean_options" -- "$cur" ) )
- ;;
- *)
- COMPREPLY=( $( compgen -W "$subcommands" -- "$cur" ) )
- ;;
- esac
-
- return 0
-}
-
_ostree_cat() {
local boolean_options="
$main_boolean_options